import { getInfo, setInfo, removeInfo } from '@/utils/storage'
const state = () => {
  return {
    userInfo: getInfo()
  }
}
const mutations = {
  setUserInfo (state, obj) {
    state.userInfo = obj
    setInfo(obj)
  },
  removeUserInfo (state, obj) {
    state.userInfo = {}
    removeInfo()
  }
}
const actions = {

}
const getters = {

}
export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}
